<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- 所有客户列表 -->
<div class="row" id="customerList">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">客户信息列表</div>
			<!-- /.panel-heading -->
			<table class="table table-bordered table-striped" style="text-align:center">
				<thead>
					<tr>
						<th>ID</th>
						<th>客户名称</th>
						<th>客户来源</th>
						<th>客户所属行业</th>
						<th>客户级别</th>
						<th>固定电话</th>
						<th>手机</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${pages.records}" var="row">
						<tr>
							<td>${row.id}</td>
							<td>${row.name}</td>
							<td>${row.source}</td>
							<td>${row.industry}</td>
							<td>${row.level}</td>
							<td>${row.phone}</td>
							<td>${row.mobile}</td>
							<td><a href="#" class="btn btn-primary btn-xs"
								data-toggle="modal" data-target="#customerEditDialog"
								onclick="editCustomer(${row.id})">修改</a> <a href="#"
								class="btn btn-danger btn-xs"
								onclick="deleteCustomer(${row.id})">删除</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="col-md-12 text-right">
				<!-- 分页标签 -->
				<ul class="pagination ul-group from-horizontal">
					<li><a href="<%=basePath%>customer/page/1">首页</a></li>
				    <li><a href="<%=basePath%>customer/page/${(pages.current-1) <= 1?1:pages.current-1}">上一页</a></li>
					<li><span>${pages.current >= pages.pages?pages.pages:pages.current}/${pages.pages}</span></li>
				    <li><a href="<%=basePath%>customer/page/${(pages.current+1) >= pages.pages?pages.pages:pages.current+1}">下一页</a></li>
				    <li><a href="<%=basePath%>customer/page/${pages.pages}">尾页</a></li>
				</ul>
				<!-- /.panel-body -->
			</div>
			<!-- /.panel -->
		</div>
		<!-- /.col-lg-12 -->
	</div>
</div>